package com.woniu113.junk.site.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu113.junk.site.dto.GoodsInfoDTO;
import com.woniu113.junk.site.model.GoodsInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu113.junk.site.param.goodsinfo.AddGoodsInfoParam;
import com.woniu113.junk.site.param.goodsinfo.AllGoodsInfoParam;
import com.woniu113.junk.site.param.goodsinfo.UpdateGoodsInfoParam;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 蜡笔没了小新
 * @since 2024年10月16日
 */
public interface GoodsInfoService extends IService<GoodsInfo> {

    public GoodsInfo findByGoodsId(Integer goodsId);

    public void updateNumberByGoodsId(Integer goodsId, Integer reduceNumber);

    public GoodsInfo addGoodsInfo(AddGoodsInfoParam param) throws Exception;

    public void upGoodsInfo(Integer goodsId, Integer upNumber);

    public void downGoodsInfo(Integer goodsId);

    public void deleteGoodsInfo(Integer goodsId);

    public void updateGoodsInfo(UpdateGoodsInfoParam param);

    public GoodsInfoDTO findAll(AllGoodsInfoParam param);

    GoodsInfoDTO findAllByAdmin(AllGoodsInfoParam param);
}
